# 编译阶段
FROM node:12.22.12-alpine3.15 AS build
WORKDIR /app

COPY . .
RUN npm config set registry https://registry.npmmirror.com && \
    npm install

RUN npm run build

RUN chmod -R 777 /app/dist

# 最终镜像
FROM lipanski/docker-static-website:2.6.0

# 静态文件路径 /home/static
COPY --from=build /app/dist /home/static/

ENTRYPOINT ["/busybox-httpd", "-f", "-v"]
CMD [ "-p", "5144" ]

# 暴露端口
EXPOSE 5144

# docker build -t firfe/couy:1.3.3 .

